home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_12_02 / smith / conv2_13.c < prev    next >
Text File  |  1993-12-14  |  307b  |  9 lines

  1. #define BASE  91          /* # possible output chars */
  2. #define FIRST_CODE  '!'   /* lowest output character */
  3. #define BASEVAL(c)  ((c)-FIRST_CODE)
  4. ...
  5.   int t = getcode();          /* get next valid char */
  6.   int u = getcode();          /* get next valid char */
  7.   return BASEVAL(t) * BASE + BASEVAL(u);
  8.  
  9.